#include "Scene.h"
#include <Windows.h>
#include <gl\GL.h>

Scene::Scene()
{
}
Scene::~Scene()
{
}
void Scene::setTerrain(Terrain * terrain)
{
	mTerrain = terrain;
}
Terrain * Scene::getTerrain()
{
	return mTerrain;
}
void Scene::setSkyBox(SkyBox * skyBox)
{
	mSkyBox = skyBox;
}
SkyBox * Scene::getSkyBox()
{
	return mSkyBox;
}
void Scene::setCamera(Camera * camera, float x, float y, float z)
{
	mCamera = camera;
	mCamera->init(x, y, z);
}
Camera * Scene::getCamera()
{
	return mCamera;
}

void Scene::render()
{
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glLoadIdentity();

	mCamera->rotate();
	mSkyBox->draw(100.f);
	mCamera->move();
	mTerrain->render();
}
